#ifndef STREAM_CONTROL_WIDGET_H
#define STREAM_CONTROL_WIDGET_H

#include <QtCore>
#include <QtGui>
#include "def.h"
#include "IceCastHttp.h"

class StreamControlWidget : public QWidget
{
	Q_OBJECT

private:
	QPushButton *m_btnStart;
	QPushButton *m_btnStop;
	QPushButton *m_btnRefresh;
	QPushButton *m_btnSetting;

	int m_nState; // 0: stop, 1: start, 2: pause

	IceCastSlot *m_lpSlot;
	void createInterface();

private slots:
	void btnStart_Click();
	void btnStop_Click();
	void btnRefresh_Click();
	void btnSetting_Click();

public:
	StreamControlWidget();
	~StreamControlWidget(void);
	void setReady(bool bReady);

signals:
	void onStart();
	void onStop();
	void onResume();
	void onPause();
	void onUpdate();
	void onShowSettings();
#if DEBUG
	void logged(const char*);
#endif
};

#endif // STREAM_CONTROL_WIDGET_H